//
//  OverallView.h
//  MapProject
//
//  Created by rrk on 4/29/10.
//  Copyright 2010 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <MapKit/MapKit.h>
#import "HydrantDetailView.h"
#import "HydrantDAO.h"

#import "MiddleLayer.h"

@interface OverallView : UIView <MKMapViewDelegate,UIPickerViewDelegate, UIPickerViewDataSource> {
	IBOutlet UISwitch *boundSwitch_;
	IBOutlet MiddleLayer *boundView_;
	IBOutlet MKMapView *mapView_;
	IBOutlet HydrantDetailView *hydrantDetailView_;
	IBOutlet UIButton *newEntryButton_;
	IBOutlet UIButton *cancelButton_;
	IBOutlet UILabel *boundingModeLabel_;
	NSMutableArray *nfpaClasses_;
	HydrantDAO *dao_;
	
	NSArray *hydrants_;
	
	
	
	BOOL inBoundMode;
}
-(IBAction)toggleBoundMode:(UISwitch*)bwitch;
-(IBAction)toggleDataEntryMode:(UIButton*)button;
-(IBAction)setLatLonByAddress:(UIButton*)button;
-(IBAction)cancelEntry:(UIButton*)button;
-(CGRect)adjustMapToRect:(CGRect)frame;
-(void) updateMap;
-(BOOL) textFieldShouldReturn:(UITextField *)textField;
-(BOOL) textViewShouldReturn:(UITextView *)textView;
-(HydrantData *)getGPMValues:(HydrantData *)data;
-(void)resetKeyBoardOnHydrantDetailsView;

@property(readwrite, retain) IBOutlet UISwitch *boundSwitch;
@property(readwrite, retain) IBOutlet MiddleLayer *boundView;
@property(readwrite, retain) IBOutlet MKMapView *mapView;
@property(readwrite, retain) IBOutlet HydrantDetailView *hydrantDetailView;
@property(readwrite, retain) IBOutlet UIButton *newEntryButton;
@property(readwrite, retain) IBOutlet UIButton *cancelButton;
@property(readwrite, retain) IBOutlet UILabel *boundingModeLabel;
@property(readwrite, retain) NSMutableArray *nfpaClasses;
@property(readwrite, retain) HydrantDAO *dao;

@end
